<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        padding: 0;
        margin: 0;
        box-sizing: border-box;
      }

      body {
        width: 100vw;
        height: 100vh;
        background: #2c3e50;
        display: flex;
        justify-content: center;
        align-items: center;
      }

      .card {
        width: 300px;
        height: 200px;
        background: orange;
        color: #fff;
        font-size: 2em;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        transform-style: preserve-3d;
        transform: perspective(900px) rotateX(45deg) rotateY(25deg);
      }

      .card::before,
      .card::after {
        width: 50%;
        height: 100%;
        position: absolute;
        background: red;
        transition: 2s;
      }

      .card::before {
        content: '新年';
        top: 0;
        left: 0;
        color: #fff;
        border-right: solid 2px orange;
        font-size: 1em;
        display: flex;
        box-sizing: border-box;
        padding-right: 20px;
        justify-content: flex-end;
        align-items: center;
        transform-origin: left;
      }

      .card::after {
        content: '快乐';
        top: 0;
        right: 0;
        color: #fff;
        border-left: solid 2px orange;
        font-size: 1em;
        display: flex;
        padding-left: 20px;
        box-sizing: border-box;
        justify-content: flex-start;
        align-items: center;
        transform-origin: right;
      }

      .card:hover::before {
        transform: rotateY(-179deg);
      }

      .card:hover::after {
        transform: rotateY(179deg);
      }
    </style>
  </head>
  <body>
    <div class="card">houdunren</div>
  </body>
</html>
